package com.agileboot.attendance.domain.record.db.entity;

import com.agileboot.common.core.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 考勤记录实体类
 *
 * @author agileboot
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("att_attendance_record")
public class AttendanceRecord extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    @TableId(value = "record_id", type = IdType.AUTO)
    private Long recordId;

    /**
     * 员工ID
     */
    @TableField("employee_id")
    private Long employeeId;
    
    /**
     * 员工姓名
     */
    @TableField("employee_name")
    private String employeeName;

    /**
     * 考勤日期
     */
    @TableField("attendance_date")
    private LocalDate attendanceDate;

    /**
     * 上班打卡时间
     */
    @TableField("clock_in_time")
    private LocalDateTime clockInTime;
    
    /**
     * 上班打卡地址
     */
    @TableField("clock_in_address")
    private String clockInAddress;
    
    /**
     * 上班打卡照片URL
     */
    @TableField("clock_in_photo_url")
    private String clockInPhotoUrl;

    /**
     * 下班打卡时间
     */
    @TableField("clock_out_time")
    private LocalDateTime clockOutTime;
    
    /**
     * 下班打卡地址
     */
    @TableField("clock_out_address")
    private String clockOutAddress;
    
    /**
     * 下班打卡照片URL
     */
    @TableField("clock_out_photo_url")
    private String clockOutPhotoUrl;

    /**
     * 打卡时长（分钟）
     */
    @TableField("duration")
    private Integer duration;

    /**
     * 考勤状态（0正常 1异常 2请假 3出差）
     */
    @TableField("status")
    private String status;

    /**
     * 考勤规则ID
     */
    @TableField("rule_id")
    private Long ruleId;

    /**
     * 考勤规则名称
     */
    @TableField("rule_name")
    private String ruleName;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;
} 